package n1942;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

	static long C(long a,long b)
	{
		if(a<b||a==0)return 0;
		if(a==b||b==0)return 1;
		if(b>a-b)b=a-b;
		long sum=1,m=2;
		for(long i=0;i<b;i++)
		{
			sum=sum*(a-i);
			while(sum%m==0&&m<=b)
			{
				sum=sum/m;
				m++;
			}
		}
		return sum;
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) throws Exception {

		BufferedReader bf=new BufferedReader(new InputStreamReader(System.in));
		String line=null;
		while((line=bf.readLine())!=null)
		{
			StringTokenizer st=new StringTokenizer(line);
			long m=Long.parseLong(st.nextToken());
			long n=Long.parseLong(st.nextToken());
			if(m==0&&n==0)break;
			if(m<n){
				long tmp=m;
				m=n;
				n=tmp;
			}
			System.out.println(C(m+n,m));
		}
		
	}

}
